package com.ww.event.observer;
/**
 *
 **/

import java.util.EventObject;
import java.util.Observable;

/**
 * {@link java.util.EventObject} {@link Observable}
 * @Author weiwei
 * @Date 2021-08-31 11:34
 * @description 事件被观察者 参考-事件驱动架构.png
 **/
public class EventObservable extends Observable{

    @Override
    public void notifyObservers(Object msg){
        setChanged();
        //需要使用EventObject 
        super.notifyObservers(new EventObject(msg));
    }
}
